Conversation
Add the ability to add optional metadata.
|
@rickhewes and just a small hint: don't use ambiguous commit messages, if you fix a typo just write it in the commit message :) |
|
Everything else looks good, I will merge your PR this week if you fix the issues |
|
I changed the commit message. What else would you like changing? I don't see your comments anywhere.... |
lib/tus/client.rb
Outdated
| raise 'New file uploading is not supported!' | ||
| end | ||
|
|
||
| if metadata.nil? then |
There was a problem hiding this comment.
Don't use trailing then unless you are writing a one-liner.
The most common way to write such statements is metadata ||= {}
lib/tus/client.rb
Outdated
| metadata[:filename] = file_name | ||
|
|
||
| pairs = [] | ||
| metadata.each do |key, value| |
There was a problem hiding this comment.
It is easier to use a brace-delimited block and place this code right at the request construction. Thus you will not need pairs (which is also a bad name choice too)
|
Sorry, forgot to publish the review :) |
|
@rickhewes , looks nice! I will merge your PR and release a new version in a few days |
|
@factyy I have another addition re CHUNK_SIZE. Maybe hold off releasing another version. Let me get the pull request going. |
|
Ok, lets do it this way |
Add the ability to add optional metadata.